﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ZBJF.Warranty.IBLL
{
    public partial interface ISendSmsVerificationCodeLogService
    {
        string LoadLastVerificationCode(string phone);

        /// <summary>
        /// 验证手机验证码是否有效(最后一条）
        /// </summary>
        /// <param name="phone"></param>
        /// <param name="code"></param>
        /// <param name="validMinutes">有效分钟数</param>
        /// <returns></returns>
        bool ValidatePhoneCode(string phone, string code, int validMinutes);


        bool AddSendVerificationCode(string phone, string verificationCode);

        /// <summary>
        /// 发送短信
        /// </summary>
        /// <param name="phone"></param>
        /// <param name="verificationCodeTemp">短信模板</param>
        /// <param name="sendMessages"></param>
        /// <param name="limitCount">限制短信数量，如注册、忘记密码等</param>
        /// <param name="resultMsg"></param>
        /// <returns></returns>
        bool SendSMS(string phone, string verificationCodeTemp, string sendMessages, ref string resultMsg, int limitCount =int.MaxValue);
    }
}
